.class public Lcom/instagram/android/directshare/d/s;
.super Ljava/lang/Object;
.source "InboxStore.java"

# interfaces
.implements Lcom/facebook/d/a;
.implements Lcom/instagram/android/feed/e/e;


# instance fields
.field private a:Z

.field private b:Lcom/instagram/android/d/k/u;

.field private c:Lcom/instagram/android/model/d;

.field private d:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Lcom/instagram/android/d/k/l",
            "<",
            "Lcom/instagram/android/directshare/b/b/a;",
            ">;>;"
        }
    .end annotation
.end field

.field private e:I

.field private f:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Lcom/instagram/j/l;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method private constructor <init>()V
    .locals 2

    .prologue
    .line 68
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 45
    new-instance v0, Lcom/instagram/android/d/k/w;

    invoke-direct {v0}, Lcom/instagram/android/d/k/w;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/d/s;->b:Lcom/instagram/android/d/k/u;

    .line 47
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/d/s;->d:Ljava/util/Set;

    .line 50
    new-instance v0, Ljava/util/TreeSet;

    new-instance v1, Lcom/instagram/android/directshare/d/t;

    invoke-direct {v1, p0}, Lcom/instagram/android/directshare/d/t;-><init>(Lcom/instagram/android/directshare/d/s;)V

    invoke-direct {v0, v1}, Ljava/util/TreeSet;-><init>(Ljava/util/Comparator;)V

    iput-object v0, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    .line 70
    new-instance v0, Lcom/facebook/b/a/k;

    invoke-static {}, Lcom/instagram/e/a/a;->a()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/facebook/b/a/k;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Lcom/facebook/b/a/k;->a()Lcom/facebook/b/a/i;

    move-result-object v0

    const-string v1, "InboxFragment.REFRESH_INBOX"

    invoke-interface {v0, v1, p0}, Lcom/facebook/b/a/i;->a(Ljava/lang/String;Lcom/facebook/d/a;)Lcom/facebook/b/a/i;

    move-result-object v0

    const-string v1, "InboxFragment.ADD_MEDIA_TO_INBOX"

    invoke-interface {v0, v1, p0}, Lcom/facebook/b/a/i;->a(Ljava/lang/String;Lcom/facebook/d/a;)Lcom/facebook/b/a/i;

    move-result-object v0

    const-string v1, "InboxFragment.REMOVE_MEDIA_FROM_INBOX"

    invoke-interface {v0, v1, p0}, Lcom/facebook/b/a/i;->a(Ljava/lang/String;Lcom/facebook/d/a;)Lcom/facebook/b/a/i;

    move-result-object v0

    invoke-interface {v0}, Lcom/facebook/b/a/i;->a()Lcom/facebook/b/a/j;

    move-result-object v0

    invoke-interface {v0}, Lcom/facebook/b/a/j;->b()V

    .line 77
    return-void
.end method

.method synthetic constructor <init>(Lcom/instagram/android/directshare/d/t;)V
    .locals 0
    .parameter

    .prologue
    .line 38
    invoke-direct {p0}, Lcom/instagram/android/directshare/d/s;-><init>()V

    return-void
.end method

.method public static a()Lcom/instagram/android/directshare/d/s;
    .locals 1

    .prologue
    .line 65
    sget-object v0, Lcom/instagram/android/directshare/d/v;->a:Lcom/instagram/android/directshare/d/s;

    return-object v0
.end method

.method static synthetic a(Lcom/instagram/android/directshare/d/s;Lcom/instagram/android/model/d;)Lcom/instagram/android/model/d;
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 38
    iput-object p1, p0, Lcom/instagram/android/directshare/d/s;->c:Lcom/instagram/android/model/d;

    return-object p1
.end method

.method static synthetic a(Lcom/instagram/android/directshare/d/s;)Ljava/util/Set;
    .locals 1
    .parameter

    .prologue
    .line 38
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->d:Ljava/util/Set;

    return-object v0
.end method

.method private a(Z)V
    .locals 3
    .parameter

    .prologue
    .line 175
    iget-object v1, p0, Lcom/instagram/android/directshare/d/s;->b:Lcom/instagram/android/d/k/u;

    new-instance v2, Lcom/instagram/android/directshare/b/a/l;

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->c:Lcom/instagram/android/model/d;

    :goto_0
    invoke-direct {v2, v0}, Lcom/instagram/android/directshare/b/a/l;-><init>(Lcom/instagram/android/model/d;)V

    new-instance v0, Lcom/instagram/android/directshare/d/u;

    invoke-direct {v0, p0, p1}, Lcom/instagram/android/directshare/d/u;-><init>(Lcom/instagram/android/directshare/d/s;Z)V

    invoke-interface {v1, v2, v0}, Lcom/instagram/android/d/k/u;->a(Lcom/instagram/android/d/k/d;Lcom/instagram/android/d/k/f;)V

    .line 226
    return-void

    .line 175
    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method static synthetic a(Lcom/instagram/android/directshare/d/s;Z)Z
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 38
    iput-boolean p1, p0, Lcom/instagram/android/directshare/d/s;->a:Z

    return p1
.end method

.method static synthetic b(Lcom/instagram/android/directshare/d/s;)Lcom/instagram/android/model/d;
    .locals 1
    .parameter

    .prologue
    .line 38
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->c:Lcom/instagram/android/model/d;

    return-object v0
.end method

.method private c(Ljava/lang/String;)Z
    .locals 1
    .parameter

    .prologue
    .line 255
    invoke-static {}, Lcom/instagram/j/u;->a()Lcom/instagram/j/u;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/instagram/j/u;->b(Ljava/lang/String;)Lcom/instagram/j/l;

    move-result-object v0

    .line 256
    if-eqz v0, :cond_0

    invoke-virtual {p0, v0}, Lcom/instagram/android/directshare/d/s;->a(Lcom/instagram/j/l;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private j()V
    .locals 2

    .prologue
    .line 260
    new-instance v0, Landroid/content/Intent;

    const-string v1, "InboxFragment.UPDATE_INBOX"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 261
    invoke-static {v0}, Lcom/instagram/n/d;->a(Landroid/content/Intent;)Z

    .line 262
    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 0
    .parameter

    .prologue
    .line 144
    iput p1, p0, Lcom/instagram/android/directshare/d/s;->e:I

    .line 145
    return-void
.end method

.method public a(Landroid/content/Context;Landroid/content/Intent;Lcom/facebook/d/b;)V
    .locals 2
    .parameter
    .parameter
    .parameter

    .prologue
    .line 234
    const-string v0, "InboxFragment.REFRESH_INBOX"

    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 235
    invoke-virtual {p0}, Lcom/instagram/android/directshare/d/s;->h()V

    .line 247
    :cond_0
    :goto_0
    return-void

    .line 236
    :cond_1
    const-string v0, "InboxFragment.ADD_MEDIA_TO_INBOX"

    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 237
    const-string v0, "mediaId"

    invoke-virtual {p2, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 238
    invoke-direct {p0, v0}, Lcom/instagram/android/directshare/d/s;->c(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 239
    invoke-direct {p0}, Lcom/instagram/android/directshare/d/s;->j()V

    goto :goto_0

    .line 241
    :cond_2
    const-string v0, "InboxFragment.REMOVE_MEDIA_FROM_INBOX"

    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 242
    const-string v0, "mediaId"

    invoke-virtual {p2, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 243
    invoke-virtual {p0, v0}, Lcom/instagram/android/directshare/d/s;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 244
    invoke-direct {p0}, Lcom/instagram/android/directshare/d/s;->j()V

    goto :goto_0
.end method

.method public a(Lcom/instagram/android/d/k/l;)V
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/instagram/android/d/k/l",
            "<",
            "Lcom/instagram/android/directshare/b/b/a;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 80
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->d:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 81
    iget-boolean v0, p0, Lcom/instagram/android/directshare/d/s;->a:Z

    if-eqz v0, :cond_0

    .line 83
    invoke-virtual {p1}, Lcom/instagram/android/d/k/l;->a()V

    .line 85
    :cond_0
    return-void
.end method

.method public a(Ljava/util/List;)V
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/instagram/j/l;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 115
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z

    .line 116
    return-void
.end method

.method public a(Lcom/instagram/j/l;)Z
    .locals 1
    .parameter

    .prologue
    .line 119
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public a(Ljava/lang/String;)Z
    .locals 2
    .parameter

    .prologue
    .line 123
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .line 124
    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 125
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/j/l;

    .line 126
    invoke-virtual {v0}, Lcom/instagram/j/l;->c()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 127
    invoke-interface {v1}, Ljava/util/Iterator;->remove()V

    .line 128
    const/4 v0, 0x1

    .line 131
    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public b(Lcom/instagram/android/d/k/l;)V
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/instagram/android/d/k/l",
            "<",
            "Lcom/instagram/android/directshare/b/b/a;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->d:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z

    .line 89
    return-void
.end method

.method public b(Ljava/lang/String;)V
    .locals 0
    .parameter

    .prologue
    .line 251
    invoke-direct {p0, p1}, Lcom/instagram/android/directshare/d/s;->c(Ljava/lang/String;)Z

    .line 252
    return-void
.end method

.method public b()Z
    .locals 1

    .prologue
    .line 92
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->c:Lcom/instagram/android/model/d;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public c()Z
    .locals 2

    .prologue
    .line 96
    iget v0, p0, Lcom/instagram/android/directshare/d/s;->e:I

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/instagram/android/directshare/d/s;->e:I

    iget-object v1, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    invoke-interface {v1}, Ljava/util/Set;->size()I

    move-result v1

    if-ge v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public d()Z
    .locals 2

    .prologue
    .line 103
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->c:Lcom/instagram/android/model/d;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->c:Lcom/instagram/android/model/d;

    invoke-virtual {v0}, Lcom/instagram/android/model/d;->b()Lcom/instagram/android/model/e;

    move-result-object v0

    sget-object v1, Lcom/instagram/android/model/e;->a:Lcom/instagram/android/model/e;

    if-eq v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public e()Ljava/util/List;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lcom/instagram/j/l;",
            ">;"
        }
    .end annotation

    .prologue
    .line 109
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 110
    iget-object v1, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    invoke-interface {v0, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 111
    return-object v0
.end method

.method public f()V
    .locals 1

    .prologue
    .line 135
    iget-object v0, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->clear()V

    .line 136
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/directshare/d/s;->c:Lcom/instagram/android/model/d;

    .line 137
    return-void
.end method

.method public g()Z
    .locals 3

    .prologue
    const/4 v0, 0x0

    .line 148
    iget v1, p0, Lcom/instagram/android/directshare/d/s;->e:I

    if-nez v1, :cond_1

    .line 163
    :cond_0
    :goto_0
    return v0

    .line 151
    :cond_1
    iget-object v1, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    invoke-interface {v1}, Ljava/util/Set;->size()I

    move-result v1

    iget v2, p0, Lcom/instagram/android/directshare/d/s;->e:I

    if-le v1, v2, :cond_0

    .line 152
    iget-object v1, p0, Lcom/instagram/android/directshare/d/s;->f:Ljava/util/Set;

    invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .line 154
    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_3

    .line 155
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    .line 156
    iget v2, p0, Lcom/instagram/android/directshare/d/s;->e:I

    if-lt v0, v2, :cond_2

    .line 157
    invoke-interface {v1}, Ljava/util/Iterator;->remove()V

    .line 159
    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 161
    :cond_3
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public h()V
    .locals 1

    .prologue
    .line 167
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/instagram/android/directshare/d/s;->a(Z)V

    .line 168
    return-void
.end method

.method public i()V
    .locals 1

    .prologue
    .line 171
    const/4 v0, 0x1

    invoke-direct {p0, v0}, Lcom/instagram/android/directshare/d/s;->a(Z)V

    .line 172
    return-void
.end method
